Skip to content

Feature IDs implementation for credentials#6415

Merged
S-Saranya1 merged 4 commits intofeature/master/feature-ids-implementationfrom
somepal/Credentials-featureID-implementation
Sep 16, 2025
Merged

Feature IDs implementation for credentials#6415
S-Saranya1 merged 4 commits intofeature/master/feature-ids-implementationfrom
somepal/Credentials-featureID-implementation

Conversation

@S-Saranya1
Copy link
Copy Markdown

@S-Saranya1 S-Saranya1 commented Sep 10, 2025

Adds business metric tracking for credentials

Motivation and Context

Keeping track of how users are providing credentials to SDKs and which credentials providers are being used.

Modifications

This PR adds business metrics support for these credential providers:

CREDENTIALS_HTTP(z) - ContainerCredentialsProvider
CREDENTIALS_ENV_VARS(g) - EnvironmentVariableCredentialsProvider
CREDENTIALS_IMDS (0) - InstanceProfileCredentialsProvider
CREDENTIALS_PROCESS(w) - ProcessCredentialsProvider
CREDENTIALS_CODE(e) - Base credentials identifier
CREDENTIALS_JVM_SYSTEM_PROPERTIES (f) - SystemPropertyCredentialsProvider
CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN(h) - WebIdentityTokenFileCredentialsProvider

Changes made:

  • In ApplyUserAgentStage.java, modified how identity providers are tracked - previously added as cfg/auth-source, deprecated it and added to the m/ business metrics string instead
  • Changes existing providerNames to the new metrics values
  • Introduces a new public API param source on some builders for credential providers to link more than one metric value together.

Testing

Added unit tests for all those credentials.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@S-Saranya1 S-Saranya1 requested a review from a team as a code owner September 10, 2025 20:44
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
74.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

assertThat(userAgentHeaders.get(0)).contains(expected);
}

private static Stream<Arguments> systemPropertyCredentialProvidersWithSessionToken() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that for all test it is written as ParameterizedTest, however there's only one parameter in the method source. Do we have a reason for why we are setting it as the ParameterizedTest?

@S-Saranya1 S-Saranya1 merged commit 8141a30 into feature/master/feature-ids-implementation Sep 16, 2025
29 of 30 checks passed
@github-actions
Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants